﻿Option Explicit On
Option Strict On

''' <summary>
''' Clase Usuario: Para almacenar datos de un usuario de la BBDD
''' </summary>
''' <author>David Martínez</author>

Public Class Usuario
    'Atributos
    Private _password As String
    Private _codigo As Integer
    Private _DNI As String
    Private _telefono As String
    Private _Nombre As String
    Private _Apellidos As String
    Private _Direccion As String

    'Propiedades
    Public Property Password As String
        Get
            Return _password
        End Get
        Set(ByVal value As String)
            _password = value
        End Set
    End Property

    Public Property Codigo As Integer
        Get
            Return _codigo
        End Get
        Set(ByVal value As Integer)
            _codigo = value
        End Set
    End Property

    Public Property DNI As String
        Get
            Return _DNI
        End Get
        Set(ByVal value As String)
            _DNI = value
        End Set
    End Property

    Public Property Telefono As String
        Get
            Return _telefono
        End Get
        Set(ByVal value As String)
            _telefono = value
        End Set
    End Property

    Public Property Nombre As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property Apellidos As String
        Get
            Return _Apellidos
        End Get
        Set(ByVal value As String)
            _Apellidos = value
        End Set
    End Property

    Public Property Direccion As String
        Get
            Return _Direccion
        End Get
        Set(ByVal value As String)
            _Direccion = value
        End Set
    End Property

    'Contructores
    Public Sub New()
        _password = ""
        _codigo = 0
        _DNI = ""
        _telefono = ""
        _Nombre = ""
        _Apellidos = ""
        _Direccion = ""
    End Sub

    Public Sub New(ByVal nuevoPass As String, ByVal nuevoCod As Integer, ByVal nuevoDNI As String, ByVal nuevoTelef As String, _
                   ByVal nuevoNombre As String, ByVal nuevoApellido As String, ByVal nuevaDireccion As String)
        _password = nuevoPass
        _codigo = nuevoCod
        _DNI = nuevoDNI
        _telefono = nuevoTelef
        _Nombre = nuevoNombre
        _Apellidos = nuevoApellido
        _Direccion = nuevaDireccion
    End Sub

    'Destructores
    Public Sub dispose()
        _password = ""
        _codigo = 0
        _DNI = ""
        _telefono = ""
        _Nombre = ""
        _Apellidos = ""
        _Direccion = ""
    End Sub

    Protected Overrides Sub finalize()
        _password = ""
        _codigo = 0
        _DNI = ""
        _telefono = ""
        _Nombre = ""
        _Apellidos = ""
        _Direccion = ""
    End Sub

    'Funciones

    'Procedimientos

End Class
